home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / mig / dist / statement.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-06  |  1.9 KB  |  65 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie the
  24.  * rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    statement.c,v $
  29.  * Revision 2.3  91/02/05  17:55:44  mrt
  30.  *     Changed to new Mach copyright
  31.  *     [91/02/01  17:55:45  mrt]
  32.  * 
  33.  * Revision 2.2  90/06/02  15:05:37  rpd
  34.  *     Created for new IPC.
  35.  *     [90/03/26  21:13:24  rpd]
  36.  * 
  37.  * 07-Apr-89  Richard Draves (rpd) at Carnegie-Mellon University
  38.  *    Extensive revamping.  Added polymorphic arguments.
  39.  *    Allow multiple variable-sized inline arguments in messages.
  40.  *
  41.  * 27-May-87  Richard Draves (rpd) at Carnegie-Mellon University
  42.  *    Created.
  43.  */
  44.  
  45. #include "error.h"
  46. #include "alloc.h"
  47. #include "statement.h"
  48.  
  49. statement_t *stats = stNULL;
  50. static statement_t **last = &stats;
  51.  
  52. statement_t *
  53. stAlloc()
  54. {
  55.     register statement_t *new;
  56.  
  57.     new = (statement_t *) malloc(sizeof *new);
  58.     if (new == stNULL)
  59.     fatal("stAlloc(): %s", unix_error_string(errno));
  60.     *last = new;
  61.     last = &new->stNext;
  62.     new->stNext = stNULL;
  63.     return new;
  64. }
  65.